#include <stdio.h>
#include <limits.h>
 
int
prm(register long long n)
{
	register long long int i;
	if (n == 0 || n == 1)
		return 0;
	for (i = 2; i * i <= n; ++i) { // <---
		if (n % i == 0) {
		 	return 0;
		}
	}
	return 1;
}
 
int
main(void)
{
	register long long i;
	register int ans = 0;
	for (i = INT_MAX / 2 - 1; i > 17 && !ans; --i) {
		printf("%7lld is %s\n", i, (ans = prm(i)) ? "prime" : "composite");
	}
	return 0;
}
